<?php 

class backend_modules_itemdelete extends HModule {
	function run() {
		if (isset($_POST['flag'])) {
			self::process();
		}
	}
	
	function process() {
		$id = $_POST['flag'];
		if (HModulesInstances::delete($_GET['id']))
			HUtil::alert('Item deleted successfully!');
		else 
			HUtil::alert('ERROR! Item deleted unsuccessfully!');
		HUtil::redirect(HCommon::navigateUrl('Modules',array('mid'=>'3')));
	}
}

?>